/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package frmwrk.core;

import frmwrk.interfaces.IAccount;
import frmwrk.interfaces.IEntry;
import java.util.GregorianCalendar;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Damian
 */
public class Entry implements IEntry {

    protected Double amount;
    protected GregorianCalendar date = new GregorianCalendar();
    protected String entryType;
    protected double previousAmount;
    protected IAccount account;

    protected Entry(Double amount, GregorianCalendar date, IAccount account) {
        this.amount = amount;
        this.date = date;
        this.account = account;
    }



    @Override
    public GregorianCalendar getDate() {
        return date;
    }

    public String getEntryType() {
        return entryType;
    }

    @Override
    public  boolean execute() {
        return true;
    }

    @Override
    public double getPreviousBalance() {
        return previousAmount;
    }

    @Override
    public void setPreviousBalance(double amount) {
        previousAmount = amount;
    }

    @Override
    public double getAmount() {
        return amount;
    }

    @Override
    public IAccount getAccount() {
        return account;
    }

    @Override
    public void setAccount(IAccount account) {
        this.account = account;
    }

    @Override
    public void setAmount(double amount) {
        this.amount = amount;
    }
}
